<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<script>
    // 类:一些有相同或相似属性的对象的抽象
    // 类用来实例化（创建）对象
    // 对象是通过类来创建的

    // 构造函数
    function ren(){
        this.name = '名字';
        this.age = '年龄';
        this.height = '身高';
        this.eat = function(){
            console.log('会吃饭');
        }
    }

    var jiafeimao = new ren();
    console.log(jiafeimao.name);



</script>


</body>
</html>